﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="AddContact.aspx.cs" Inherits="MockPrjTeam2.Pages.Forms.AddContact" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">    
    <table cellpadding="0" cellspacing="0" style="width: 100%">
  <tr>
      <td colspan="4" style="font-family: Arial, Helvetica, sans-serif; font-size: large; color: #639A18;
                font-weight: bold; width: 592px;">
                Create New Contact
      </td>      
  </tr>
  <tr>
    <td>
        First Name *
    </td>
    <td>
        <asp:TextBox ID="txtFName" runat="server" Width="200px"></asp:TextBox>        
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
            ControlToValidate="txtFName" ErrorMessage="Enter first name" 
            SetFocusOnError="True"></asp:RequiredFieldValidator>
    </td> 
    <td>
        Manager Name
    </td>
    <td>
        <asp:TextBox ID="txtContact" runat="server" Width="200px" ClientIDMode="Static"></asp:TextBox>   
       <asp:Button ID="Button1" runat="server" Text="Lookup" OnClientClick="OpenPopup()" />
       <asp:HiddenField ID="hdnContactId" ClientIDMode="Static" runat="server" />  
        <asp:HiddenField ID="hdnManagerId" ClientIDMode="Static" runat="server" />    
    </td>     
  </tr>
  <tr>
    <td>        
         Surname *  
    </td> 
    <td>
        <asp:TextBox ID="txtSName" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
            ControlToValidate="txtSName" ErrorMessage="Enter Sur name" 
            SetFocusOnError="True"></asp:RequiredFieldValidator>
    </td>
    <td>
        Contact Type *
    </td>
    <td>
        <asp:DropDownList ID="ddlContactType" runat="server"></asp:DropDownList>           
    </td>     
  </tr>
  <tr>
    <td>        
         Known As  
    </td> 
    <td>
        <asp:TextBox ID="txtKnown" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
            ControlToValidate="txtKnown" ErrorMessage="Enter known"></asp:RequiredFieldValidator>
    </td>
    <td>
        Best Contact Method
    </td>
    <td>
        <asp:DropDownList ID="ddlMethod" runat="server">
            <asp:ListItem>Choise</asp:ListItem>
            <asp:ListItem>Get</asp:ListItem>
            <asp:ListItem>Post</asp:ListItem>
            <asp:ListItem>Travel</asp:ListItem>
        </asp:DropDownList>           
    </td>     
  </tr>
  <tr>
    <td>        
         Office Phone 
    </td> 
    <td>
        <asp:TextBox ID="txtOffice" runat="server"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
            ControlToValidate="txtOffice" ErrorMessage="enter phone" SetFocusOnError="True" 
            ValidationExpression="^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$"></asp:RegularExpressionValidator>
    </td>
    <td>
        Job Role
    </td>
    <td>
        <asp:TextBox ID="txtJobRole" runat="server"></asp:TextBox>           
        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
            ControlToValidate="txtJobRole" ErrorMessage="Enter Role" SetFocusOnError="True"></asp:RequiredFieldValidator>
    </td>     
  </tr> 
  <tr>
    <td>        
         Mobile Phone 
    </td> 
    <td>
        <asp:TextBox ID="txtMobile" runat="server"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
            ControlToValidate="txtMobile" ErrorMessage="enter Phone" SetFocusOnError="True" 
            ValidationExpression="^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$"></asp:RegularExpressionValidator>
    </td>
    <td>
        Work base
    </td>
    <td>
        <asp:TextBox ID="txtWork" runat="server"></asp:TextBox>           
        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
            ControlToValidate="txtWork" ErrorMessage="Enter work base" 
            SetFocusOnError="True"></asp:RequiredFieldValidator>
    </td>     
  </tr>
  <tr>
    <td>        
         ST Home Phone
    </td> 
    <td>
        <asp:TextBox ID="txtHomePhone" runat="server"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
            ControlToValidate="txtHomePhone" ErrorMessage="enter Phone" 
            SetFocusOnError="True" 
            ValidationExpression="^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$"></asp:RegularExpressionValidator>
    </td>
    <td>
        Job Title
    </td>
    <td>
        <asp:TextBox ID="txtJobTitle" runat="server"></asp:TextBox>           
        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
            ControlToValidate="txtJobTitle" ErrorMessage="Enter title" 
            SetFocusOnError="True"></asp:RequiredFieldValidator>
    </td>     
  </tr> 
  <tr>
    <td>        
         Email Address 
    </td> 
    <td>
        <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
        
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
            ControlToValidate="txtEmail" ErrorMessage="Mail not format" 
            SetFocusOnError="True" 
            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
        
    </td>
    <td>
        Is Active?
    </td>
    <td>
        <asp:CheckBox ID="ckActive" runat="server"/>          
    </td>     
  </tr>                
  <tr>
    <td colspan="2">        
        <asp:Button ID="btAdd" runat="server" Text="Add" onclick="btAdd_Click" />&nbsp&nbsp
        <asp:Button ID="btUpdate" runat="server" Text="Update" 
            onclick="btUpdate_Click" />&nbsp&nbsp
        <asp:Button ID="btClear" runat="server" Text="Clear" onclick="btClear_Click" />        
    </td>
  </tr>
 </table>
</asp:Content>
